package com.tju.backend.resources.controller.attest;

import com.tju.backend.entity.monitor.SystemHardwareInfo;
import com.tju.backend.utils.result.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 服务监控
 *
 * @USER: CLS
 */
@RestController
public class ServiceController {

    private static final String prefix = "service";

    @RequestMapping(prefix + "/copyTo.do")
    public Result<Object> copyTo() {

        SystemHardwareInfo service = new SystemHardwareInfo();
        try {
            service.copyTo();
            return ResultUtil.success(ResultEnum.SUCCESS, service);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return ResultUtil.success(ResultEnum.UNKONW_ERROR);
    }
}
